<script setup lang="ts">
import {ref,defineExpose,defineEmits,inject } from "vue";
const str = ref('77777s')

console.log(inject('toDoList'));

// const emit= defineEmits(['ctsj'])

const emit = defineEmits<{(e:'ctsj',val:string):void}>()

</script>

<template>
    <el-input v-model="str" placeholder="Please input" />
    <el-button type="primary" @click="emit('ctsj',str)">提交</el-button>
</template>

<style scoped>
</style>

